# Maintainer: Balló György <ballogyor+arch at gmail dot com>

pkgname=poppler-sharp
pkgver=0.0.3
pkgrel=5
pkgdesc="C Sharp bindings for Poppler"
arch=('any')
url="https://github.com/jacintos/poppler-sharp"
license=('GPL')
depends=('gtk-sharp-2' 'poppler-glib')
source=(https://github.com/downloads/jacintos/$pkgname/$pkgname-$pkgver.tar.bz2)
sha256sums=('bb418431878d072c5606e2d55183695baf631e9942461bff668d1276ebc3431e')

prepare() {
  cd $pkgname-$pkgver
  sed -i 's/gmcs/mcs/
          s/2\.0/2.0-api/' m4/mono.m4
  sed -i 's|pkglib_DATA|monolibdir = $(pkglibdir)/\nmonolib_DATA|' Makefile.am
  autoreconf -fi
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
